package cn.vc.basicmodule.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.sql.Timestamp;

public class Entity {
    @TableId(type = IdType.AUTO)
    private Long id = null;//数据库自增ID
    private Timestamp setTime = new Timestamp(System.currentTimeMillis());//创建时间
    @TableLogic(value = "0"/*存在*/, delval = "1"/*删除*/)
    private Integer deleted = 0;//删除字段
    @Version
    private Long version = 0L;//乐观锁字段

    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Timestamp getSetTime() {
        return this.setTime;
    }
    public void setSetTime(Timestamp setTime) {
        this.setTime = setTime;
    }
    public Integer getDeleted() {
        return deleted;
    }
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }
    public Long getVersion() {
        return version;
    }
    public void setVersion(Long version) {
        this.version = version;
    }
}
